3.5.47 \(\int \frac {\cot ^5(c+d x)}{a+b \sin ^2(c+d x)} \, dx\) [447]

Optimal. Leaf size=89 \[ \frac {(2 a+b) \csc ^2(c+d x)}{2 a^2 d}-\frac {\csc ^4(c+d x)}{4 a d}+\frac {(a+b)^2 \log (\sin (c+d x))}{a^3 d}-\frac {(a+b)^2 \log \left (a+b \sin ^2(c+d x)\right )}{2 a^3 d} \]

[Out]

1/2*(2*a+b)*csc(d*x+c)^2/a^2/d-1/4*csc(d*x+c)^4/a/d+(a+b)^2*ln(sin(d*x+c))/a^3/d-1/2*(a+b)^2*ln(a+b*sin(d*x+c)
^2)/a^3/d

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 89, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {3273, 90} \begin {gather*} -\frac {(a+b)^2 \log \left (a+b \sin ^2(c+d x)\right )}{2 a^3 d}+\frac {(a+b)^2 \log (\sin (c+d x))}{a^3 d}+\frac {(2 a+b) \csc ^2(c+d x)}{2 a^2 d}-\frac {\csc ^4(c+d x)}{4 a d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]^5/(a + b*Sin[c + d*x]^2),x]

[Out]

((2*a + b)*Csc[c + d*x]^2)/(2*a^2*d) - Csc[c + d*x]^4/(4*a*d) + ((a + b)^2*Log[Sin[c + d*x]])/(a^3*d) - ((a +
b)^2*Log[a + b*Sin[c + d*x]^2])/(2*a^3*d)

Rule 90

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rule 3273

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.)*tan[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> With[{ff = Free
Factors[Sin[e + f*x]^2, x]}, Dist[ff^((m + 1)/2)/(2*f), Subst[Int[x^((m - 1)/2)*((a + b*ff*x)^p/(1 - ff*x)^((m
 + 1)/2)), x], x, Sin[e + f*x]^2/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rubi steps

\begin {align*} \int \frac {\cot ^5(c+d x)}{a+b \sin ^2(c+d x)} \, dx &=\frac {\text {Subst}\left (\int \frac {(1-x)^2}{x^3 (a+b x)} \, dx,x,\sin ^2(c+d x)\right )}{2 d}\\ &=\frac {\text {Subst}\left (\int \left (\frac {1}{a x^3}+\frac {-2 a-b}{a^2 x^2}+\frac {(a+b)^2}{a^3 x}-\frac {b (a+b)^2}{a^3 (a+b x)}\right ) \, dx,x,\sin ^2(c+d x)\right )}{2 d}\\ &=\frac {(2 a+b) \csc ^2(c+d x)}{2 a^2 d}-\frac {\csc ^4(c+d x)}{4 a d}+\frac {(a+b)^2 \log (\sin (c+d x))}{a^3 d}-\frac {(a+b)^2 \log \left (a+b \sin ^2(c+d x)\right )}{2 a^3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.36, size = 72, normalized size = 0.81 \begin {gather*} \frac {2 a (2 a+b) \csc ^2(c+d x)-a^2 \csc ^4(c+d x)+2 (a+b)^2 \left (2 \log (\sin (c+d x))-\log \left (a+b \sin ^2(c+d x)\right )\right )}{4 a^3 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]^5/(a + b*Sin[c + d*x]^2),x]

[Out]

(2*a*(2*a + b)*Csc[c + d*x]^2 - a^2*Csc[c + d*x]^4 + 2*(a + b)^2*(2*Log[Sin[c + d*x]] - Log[a + b*Sin[c + d*x]
^2]))/(4*a^3*d)

________________________________________________________________________________________

Maple [A]
time = 0.54, size = 161, normalized size = 1.81

method result size
derivativedivides \(\frac {-\frac {1}{16 a \left (1+\cos \left (d x +c \right )\right )^{2}}-\frac {-7 a -4 b}{16 a^{2} \left (1+\cos \left (d x +c \right )\right )}+\frac {\left (a^{2}+2 a b +b^{2}\right ) \ln \left (1+\cos \left (d x +c \right )\right )}{2 a^{3}}-\frac {1}{16 a \left (\cos \left (d x +c \right )-1\right )^{2}}-\frac {7 a +4 b}{16 a^{2} \left (\cos \left (d x +c \right )-1\right )}+\frac {\left (a^{2}+2 a b +b^{2}\right ) \ln \left (\cos \left (d x +c \right )-1\right )}{2 a^{3}}-\frac {\left (a^{2}+2 a b +b^{2}\right ) \ln \left (a +b -b \left (\cos ^{2}\left (d x +c \right )\right )\right )}{2 a^{3}}}{d}\) \(161\)
default \(\frac {-\frac {1}{16 a \left (1+\cos \left (d x +c \right )\right )^{2}}-\frac {-7 a -4 b}{16 a^{2} \left (1+\cos \left (d x +c \right )\right )}+\frac {\left (a^{2}+2 a b +b^{2}\right ) \ln \left (1+\cos \left (d x +c \right )\right )}{2 a^{3}}-\frac {1}{16 a \left (\cos \left (d x +c \right )-1\right )^{2}}-\frac {7 a +4 b}{16 a^{2} \left (\cos \left (d x +c \right )-1\right )}+\frac {\left (a^{2}+2 a b +b^{2}\right ) \ln \left (\cos \left (d x +c \right )-1\right )}{2 a^{3}}-\frac {\left (a^{2}+2 a b +b^{2}\right ) \ln \left (a +b -b \left (\cos ^{2}\left (d x +c \right )\right )\right )}{2 a^{3}}}{d}\) \(161\)
risch \(-\frac {2 \left (2 a \,{\mathrm e}^{6 i \left (d x +c \right )}+b \,{\mathrm e}^{6 i \left (d x +c \right )}-2 a \,{\mathrm e}^{4 i \left (d x +c \right )}-2 b \,{\mathrm e}^{4 i \left (d x +c \right )}+2 a \,{\mathrm e}^{2 i \left (d x +c \right )}+b \,{\mathrm e}^{2 i \left (d x +c \right )}\right )}{d \,a^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{4}}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{a d}+\frac {2 b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{a^{2} d}+\frac {b^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{a^{3} d}-\frac {\ln \left ({\mathrm e}^{4 i \left (d x +c \right )}-\frac {2 \left (2 a +b \right ) {\mathrm e}^{2 i \left (d x +c \right )}}{b}+1\right )}{2 a d}-\frac {\ln \left ({\mathrm e}^{4 i \left (d x +c \right )}-\frac {2 \left (2 a +b \right ) {\mathrm e}^{2 i \left (d x +c \right )}}{b}+1\right ) b}{a^{2} d}-\frac {\ln \left ({\mathrm e}^{4 i \left (d x +c \right )}-\frac {2 \left (2 a +b \right ) {\mathrm e}^{2 i \left (d x +c \right )}}{b}+1\right ) b^{2}}{2 d \,a^{3}}\) \(277\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)^5/(a+sin(d*x+c)^2*b),x,method=_RETURNVERBOSE)

[Out]

1/d*(-1/16/a/(1+cos(d*x+c))^2-1/16*(-7*a-4*b)/a^2/(1+cos(d*x+c))+1/2*(a^2+2*a*b+b^2)/a^3*ln(1+cos(d*x+c))-1/16
/a/(cos(d*x+c)-1)^2-1/16*(7*a+4*b)/a^2/(cos(d*x+c)-1)+1/2*(a^2+2*a*b+b^2)/a^3*ln(cos(d*x+c)-1)-1/2*(a^2+2*a*b+
b^2)/a^3*ln(a+b-b*cos(d*x+c)^2))

________________________________________________________________________________________

Maxima [A]
time = 0.32, size = 92, normalized size = 1.03 \begin {gather*} -\frac {\frac {2 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \log \left (b \sin \left (d x + c\right )^{2} + a\right )}{a^{3}} - \frac {2 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \log \left (\sin \left (d x + c\right )^{2}\right )}{a^{3}} - \frac {2 \, {\left (2 \, a + b\right )} \sin \left (d x + c\right )^{2} - a}{a^{2} \sin \left (d x + c\right )^{4}}}{4 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^5/(a+b*sin(d*x+c)^2),x, algorithm="maxima")

[Out]

-1/4*(2*(a^2 + 2*a*b + b^2)*log(b*sin(d*x + c)^2 + a)/a^3 - 2*(a^2 + 2*a*b + b^2)*log(sin(d*x + c)^2)/a^3 - (2
*(2*a + b)*sin(d*x + c)^2 - a)/(a^2*sin(d*x + c)^4))/d

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 198 vs. \(2 (83) = 166\).
time = 0.45, size = 198, normalized size = 2.22 \begin {gather*} -\frac {2 \, {\left (2 \, a^{2} + a b\right )} \cos \left (d x + c\right )^{2} - 3 \, a^{2} - 2 \, a b + 2 \, {\left ({\left (a^{2} + 2 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{2} + a^{2} + 2 \, a b + b^{2}\right )} \log \left (-b \cos \left (d x + c\right )^{2} + a + b\right ) - 4 \, {\left ({\left (a^{2} + 2 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{2} + a^{2} + 2 \, a b + b^{2}\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right )}{4 \, {\left (a^{3} d \cos \left (d x + c\right )^{4} - 2 \, a^{3} d \cos \left (d x + c\right )^{2} + a^{3} d\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^5/(a+b*sin(d*x+c)^2),x, algorithm="fricas")

[Out]

-1/4*(2*(2*a^2 + a*b)*cos(d*x + c)^2 - 3*a^2 - 2*a*b + 2*((a^2 + 2*a*b + b^2)*cos(d*x + c)^4 - 2*(a^2 + 2*a*b
+ b^2)*cos(d*x + c)^2 + a^2 + 2*a*b + b^2)*log(-b*cos(d*x + c)^2 + a + b) - 4*((a^2 + 2*a*b + b^2)*cos(d*x + c
)^4 - 2*(a^2 + 2*a*b + b^2)*cos(d*x + c)^2 + a^2 + 2*a*b + b^2)*log(1/2*sin(d*x + c)))/(a^3*d*cos(d*x + c)^4 -
 2*a^3*d*cos(d*x + c)^2 + a^3*d)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cot ^{5}{\left (c + d x \right )}}{a + b \sin ^{2}{\left (c + d x \right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)**5/(a+b*sin(d*x+c)**2),x)

[Out]

Integral(cot(c + d*x)**5/(a + b*sin(c + d*x)**2), x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 205 vs. \(2 (83) = 166\).
time = 0.52, size = 205, normalized size = 2.30 \begin {gather*} -\frac {\frac {a {\left (\frac {\cos \left (d x + c\right ) + 1}{\cos \left (d x + c\right ) - 1} + \frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1}\right )}^{2} + 12 \, a {\left (\frac {\cos \left (d x + c\right ) + 1}{\cos \left (d x + c\right ) - 1} + \frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1}\right )} + 8 \, b {\left (\frac {\cos \left (d x + c\right ) + 1}{\cos \left (d x + c\right ) - 1} + \frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1}\right )}}{a^{2}} + \frac {32 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \log \left ({\left | -a {\left (\frac {\cos \left (d x + c\right ) + 1}{\cos \left (d x + c\right ) - 1} + \frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1}\right )} + 2 \, a + 4 \, b \right |}\right )}{a^{3}}}{64 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^5/(a+b*sin(d*x+c)^2),x, algorithm="giac")

[Out]

-1/64*((a*((cos(d*x + c) + 1)/(cos(d*x + c) - 1) + (cos(d*x + c) - 1)/(cos(d*x + c) + 1))^2 + 12*a*((cos(d*x +
 c) + 1)/(cos(d*x + c) - 1) + (cos(d*x + c) - 1)/(cos(d*x + c) + 1)) + 8*b*((cos(d*x + c) + 1)/(cos(d*x + c) -
 1) + (cos(d*x + c) - 1)/(cos(d*x + c) + 1)))/a^2 + 32*(a^2 + 2*a*b + b^2)*log(abs(-a*((cos(d*x + c) + 1)/(cos
(d*x + c) - 1) + (cos(d*x + c) - 1)/(cos(d*x + c) + 1)) + 2*a + 4*b))/a^3)/d

________________________________________________________________________________________

Mupad [B]
time = 14.50, size = 103, normalized size = 1.16 \begin {gather*} \frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )\right )\,\left (a^2+2\,a\,b+b^2\right )}{a^3\,d}-\frac {\ln \left (a+a\,{\mathrm {tan}\left (c+d\,x\right )}^2+b\,{\mathrm {tan}\left (c+d\,x\right )}^2\right )\,\left (a^2+2\,a\,b+b^2\right )}{2\,a^3\,d}-\frac {\frac {1}{4\,a}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,\left (a+b\right )}{2\,a^2}}{d\,{\mathrm {tan}\left (c+d\,x\right )}^4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(c + d*x)^5/(a + b*sin(c + d*x)^2),x)

[Out]

(log(tan(c + d*x))*(2*a*b + a^2 + b^2))/(a^3*d) - (log(a + a*tan(c + d*x)^2 + b*tan(c + d*x)^2)*(2*a*b + a^2 +
 b^2))/(2*a^3*d) - (1/(4*a) - (tan(c + d*x)^2*(a + b))/(2*a^2))/(d*tan(c + d*x)^4)

________________________________________________________________________________________